<?php

namespace App\AbstractFactory;

use App\Exception\UnitException;

abstract class UnitAbstract implements UnitInterface
{
    abstract public function bombardStrength();

    public function getComposite()
    {
        return null;
    }

    public function addUnit(UnitInterface $uint)
    {
        throw new UnitException(get_class($this) . 'is a leaf');
    }

    public function removeUnit(UnitInterface $uint)
    {
        throw new UnitException(get_class($this) . 'is a leaf');
    }
}
